<?php 
    header("Content-type: text/html; charset=utf-8");
    require_once('auth_i.inc.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>

<head>
    <title>Просмотр последних событий</title>
    <?php
        require_once('headers.inc.php');
    ?>
    <script src="log.js" type="text/javascript"></script>
    <script type="text/javascript">

    <?php
    if (!empty($_GET['cid']))
    {
        echo 'var cid='.$_GET['cid'].";\n";
    }
    if (!empty($_GET['back']))
    {
        echo 'var back_url="'.$_GET['back']."\";\n";
    }
    
    echo 'var use_alarm='.(($feature_alarm)?'true':'false').";\n";
    
    ?>
    </script>

</head>
<body>

<div id="header-mon">
<div id="title">
</div>

<div id="clock"></div>
<div id="mode-info"></div>
<?php
  if (isset($user))
  {
    echo '<div id="user-info">'.$auth->explainRole(intval($user['role'])).': <b>'.$user['name'].' ('.$user['login'].')</b></div>';
  }
?>
<input type="hidden" name="cid" value=""/>
</div>


<div id="toolbar">
        <button id="back" name="back">Назад</button>

        <label>Источник:<select name="cont-sel" id="cont-sel"></select></label>

        <span id="sys-radio">
            <input type="radio" id="radio1" name="system" value="-1"/><label for="radio1">Вcе</label>
            <input type="radio" id="radio2" name="system" value="0" /><label for="radio2">Система</label>
            <input type="radio" id="radio3" name="system" value="1" checked="checked" /><label for="radio3">Контроллер</label>
        </span>
        <span id="filt-log">
            <input type="radio" id="radio5" name="filt" value="-1" checked="checked" /><label for="radio5">Все</label>
            <input type="radio" id="radio6" name="filt" value="1" /><label for="radio6">Состояние</label>
            <input type="radio" id="radio7" name="filt" value="2" /><label for="radio7">Ошибки</label>
        </span>
        

</div>
<div id="content-log">
<table id="list"></table> 
<div id="pager"></div>
</div>

</body>
</html>
